knitr::opts_chunk$set(echo = TRUE)
database <- read.csv("dataframe_paper_do_concepts_matter.csv")
View(database)
database
ggplot(database, aes(x=year, y=resenha.pe)) + geom_line() + geom_point(shape=21, fill="white", size=4) + scale_x_continuous(breaks = database$year) + theme(axis.title.x = element_blank(), axis.title.y = element_blank(), axis.text.x = element_text(colour = "black", size = rel(1.4)), axis.text.y = element_text(colour = "black", size=rel(1.4)))
require(tidyverse)
ggplot(database, aes(x=year, y=resenha.pe)) + geom_line() + geom_point(shape=21, fill="white", size=4) + scale_x_continuous(breaks = database$year) + theme(axis.title.x = element_blank(), axis.title.y = element_blank(), axis.text.x = element_text(colour = "black", size = rel(1.4)), axis.text.y = element_text(colour = "black", size=rel(1.4)))
ggplot(database, aes(x=year, y=resenha.pe)) + geom_line() + geom_point(shape=21, fill="white", size=4) + scale_x_continuous(breaks = database$year) + theme(axis.title.x = element_blank(), axis.title.y = element_blank(), axis.text.x = element_text(colour = "black", size = rel(1.4)), axis.text.y = element_text(colour = "black", size=rel(1.4)))
ggplot(database, aes(x=year, y=value, fill=variable)) + geom_line(position = position_dodge(0.4)) + geom_point(shape=21, size=4, position = position_dodge(0.4)) +scale_fill_manual(values = c("black", "white"), label=c("Latin America", "South America")) + guides(fill=guide_legend(title = NULL)) + theme(axis.title.x = element_blank(), axis.text.x = element_text(colour = "black", size = rel(1.5)), axis.text.y = element_text(colour = "black", size = rel(1.5)), legend.text = element_text(size=12), axis.title.y = element_text(size = rel(1.4))) + scale_x_continuous(breaks = conc$year) + ylab("%")
g2 <- database %>% select(year, perc.latin.america, perc.south.america)
View(g2)
g2 <- database %>% select(year, perc.latin.america, perc.south.america) %>% gather(key = conceitos, value = valores, -year)
View(g2)
ggplot(g2, aes(x=year, y=valores, fill=conceitos)) + geom_line(position = position_dodge(0.4)) + geom_point(shape=21, size=4, position = position_dodge(0.4)) +scale_fill_manual(values = c("black", "white"), label=c("Latin America", "South America")) + guides(fill=guide_legend(title = NULL)) + theme(axis.title.x = element_blank(), axis.text.x = element_text(colour = "black", size = rel(1.5)), axis.text.y = element_text(colour = "black", size = rel(1.5)), legend.text = element_text(size=12), axis.title.y = element_text(
)
ggplot(g2, aes(x=year, y=valores, fill=conceitos)) + geom_line(position = position_dodge(0.4)) + geom_point(shape=21, size=4, position = position_dodge(0.4)) +scale_fill_manual(values = c("black", "white"), label=c("Latin America", "South America")) + guides(fill=guide_legend(title = NULL)) + theme(axis.title.x = element_blank(), axis.text.x = element_text(colour = "black", size = rel(1.5)), axis.text.y = element_text(colour = "black", size = rel(1.5)), legend.text = element_text(size=12), axis.title.y = element_text(size = rel(1.4))) + scale_x_continuous(breaks = g2$year) + ylab("%")
View(database)
> ggplot(database, aes(x=year, y=perc.latin.minus.south)) + geom_line() + geom_point(shape=21, size=4, fill="white") + scale_x_continuous(breaks = database$year) + geom_hline(yintercept = 0) + theme(axis.title.x = element_blank(), axis.text.x = element_text(colour = "black", size = rel(1.4)), axis.text.y = element_text(colour = "black", size = rel(1.4)), axis.title.y = element_text(size=rel(1.4))) + ylab("%")
ggplot(database, aes(x=year, y=perc.latin.minus.south)) + geom_line() + geom_point(shape=21, size=4, fill="white") + scale_x_continuous(breaks = database$year) + geom_hline(yintercept = 0) + theme(axis.title.x = element_blank(), axis.text.x = element_text(colour = "black", size = rel(1.4)), axis.text.y = element_text(colour = "black", size = rel(1.4)), axis.title.y = element_text(size=rel(1.4))) + ylab("%")
g4 <- database %>% select(president, perc.latin.america, perc.south.america)
View(g4)
g4$president <- factor(g4$president, levels = c(1,2,3,4,5))
g4$president
table(g4$president)
g4$president <- factor(g4$president, levels = c(1,2,3,4,5), labels = c("FHC1", "FHC2", "LULA1", "LULA2", "DILMA"))
table(g4$president)
View(g4)
View(g4)
g4 <- gather(g4, key = "conceitos", value = "valores", -president)
View(g4)
ggplot(g2, aes(x=year, y=valores, fill=conceitos)) + geom_line(position = position_dodge(0.4)) + geom_point(shape=21, size=4, position = position_dodge(0.4)) +scale_fill_manual(values = c("black", "white"), label=c("Latin America", "South America")) + guides(fill=guide_legend(title = NULL)) + theme(axis.title.x = element_blank(), axis.text.x = element_text(colour = "black", size = rel(1.5)), axis.text.y = element_text(colour = "black", size = rel(1.5)), legend.text = element_text(size=12), axis.title.y = element_text(size = rel(1.4))) + scale_x_continuous(breaks = g2$year) + ylab("%")
ggplot(database, aes(x=year, y=perc.latin.minus.south)) + geom_line() + geom_point(shape=21, size=4, fill="white") + scale_x_continuous(breaks = database$year) + geom_hline(yintercept = 0) + theme(axis.title.x = element_blank(), axis.text.x = element_text(colour = "black", size = rel(1.4)), axis.text.y = element_text(colour = "black", size = rel(1.4)), axis.title.y = element_text(size=rel(1.4))) + ylab("%")
ggplot(g4, aes(x=president, y=valores, fill=conceitos)) + geom_bar(position="dodge", stat="summary", fun.y="mean", colour="black") +scale_fill_manual(values = c("white", "grey22"), label=c("Latin America", "South America")) + theme(axis.title.x = element_blank(), axis.text.x = element_text(colour = "black", size=rel(1.5)), axis.title.y = element_text(size = rel(1.4), colour = "black"), axis.text.y = element_text(size = rel(1.4), colour = "black")) + ylab("%") + guides(fill=guide_legend(title = NULL))
ggplot(g4, aes(x=president, y=valores, fill=conceitos)) + geom_bar(position="dodge", stat="summary", fun.y="mean", colour="black") +scale_fill_manual(values = c("white", "grey22"), label=c("Latin America", "South America")) + theme(axis.title.x = element_blank(), axis.text.x = element_text(colour = "black", size=rel(1.5)), axis.title.y = element_text(size = rel(1.4), colour = "black"), axis.text.y = element_text(size = rel(1.4), colour = "black")) + ylab("%") + guides(fill=guide_legend(title = NULL))
View(database)
ggplot(database, aes(x=president, y=perc.latin.minus.south)) + geom_bar(position="dodge", stat="summary", fun.y="mean", fill="white", colour="black")  + theme(axis.title.x = element_blank(), axis.text.x = element_text(colour = "black", size=rel(1.5)), axis.title.y = element_text(size = rel(1.4), colour = "black"), axis.text.y = element_text(size = rel(1.4), colour = "black")) + ylab("%") + guides(fill=guide_legend(title = NULL)) + geom_hline(yintercept = 0, colour="black", size=.9)
ggplot(database, aes(x=president, y=perc.latin.minus.south)) + geom_bar(position="dodge", stat="summary", fun.y="mean", fill="white", colour="black")  + theme(axis.title.x = element_blank(), axis.text.x = element_text(colour = "black", size=rel(1.5)), axis.title.y = element_text(size = rel(1.4), colour = "black"), axis.text.y = element_text(size = rel(1.4), colour = "black")) + ylab("%") + guides(fill=guide_legend(title = NULL)) + geom_hline(yintercept = 0, colour="black", size=.9)
g5 <- database %>% select(president, perc.latin.minus.south)
View(g5)
g5$president <- factor(g5$president, levels = c(1,2,3,4,5), labels = c("FHC1", "FHC2", "LULA1", "LULA2", "DILMA"))
ggplot(g5, aes(x=president, y=perc.latin.minus.south)) + geom_bar(position="dodge", stat="summary", fun.y="mean", fill="white", colour="black")  + theme(axis.title.x = element_blank(), axis.text.x = element_text(colour = "black", size=rel(1.5)), axis.title.y = element_text(size = rel(1.4), colour = "black"), axis.text.y = element_text(size = rel(1.4), colour = "black")) + ylab("%") + guides(fill=guide_legend(title = NULL)) + geom_hline(yintercept = 0, colour="black", size=.9)
ggplot(g5, aes(x=president, y=perc.latin.minus.south)) + geom_bar(position="dodge", stat="summary", fun.y="mean", fill="white", colour="black")  + theme(axis.title.x = element_blank(), axis.text.x = element_text(colour = "black", size=rel(1.5)), axis.title.y = element_text(size = rel(1.4), colour = "black"), axis.text.y = element_text(size = rel(1.4), colour = "black")) + ylab("%") + guides(fill=guide_legend(title = NULL)) + geom_hline(yintercept = 0, colour="black", size=.9)
ggplot(database, aes(x=year, y=perc.latin.minus.south)) + geom_line() + geom_point(shape=21, size=4, fill="white") + scale_x_continuous(breaks = d$year) + geom_hline(yintercept = 0) + theme(axis.title.x = element_blank(), axis.title.y = element_text(size = rel(1.4)), axis.text.x = element_text(colour = "black", size = rel(1.4)), axis.text.y = element_text(colour = "black", size = rel(1.4))) + annotate("text", label="I South American \n Summit", x=2000, y=-2.1) + annotate("text", label= "II South American \n Summit", x=2003, y=0.2) + annotate("text", label="Sub-secretary \n of South America", x=2003, y=-1.66) + annotate("text", label="SACN", x=2004, y=-0.5) + annotate("text", label="I SACN Summit", x=2005, y=-2.6) + annotate("text", label="II SACN \n Summit", x=2007, y=-1.4) + annotate("text", label="UNASUR\nCALC", x=2008, y=-0.8) + annotate("text", label="CELAC", x=2010, y=0.2) + ylab("%")
ggplot(database, aes(x=year, y=perc.latin.minus.south)) + geom_line() + geom_point(shape=21, size=4, fill="white") + scale_x_continuous(breaks = database$year) + geom_hline(yintercept = 0) + theme(axis.title.x = element_blank(), axis.title.y = element_text(size = rel(1.4)), axis.text.x = element_text(colour = "black", size = rel(1.4)), axis.text.y = element_text(colour = "black", size = rel(1.4))) + annotate("text", label="I South American \n Summit", x=2000, y=-2.1) + annotate("text", label= "II South American \n Summit", x=2003, y=0.2) + annotate("text", label="Sub-secretary \n of South America", x=2003, y=-1.66) + annotate("text", label="SACN", x=2004, y=-0.5) + annotate("text", label="I SACN Summit", x=2005, y=-2.6) + annotate("text", label="II SACN \n Summit", x=2007, y=-1.4) + annotate("text", label="UNASUR\nCALC", x=2008, y=-0.8) + annotate("text", label="CELAC", x=2010, y=0.2) + ylab("%")
